package com.situ.mall.controller.back;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.situ.mall.entity.Category;
import com.situ.mall.service.ICategoryService;
import com.situ.mall.util.JSONResult;

@Controller
@RequestMapping("/category")
public class CategoryController {
	@Autowired
	private ICategoryService categoryService;

	@RequestMapping("/selectSecondCategoryListByTopCategoryId")
	@ResponseBody
	public JSONResult selectSecondCategoryListByTopCategoryId(Integer id) {
		List<Category> list = categoryService.selectSecondCategoryListByTopCategoryId(id);
		return JSONResult.ok(list);
	}
}
